﻿@{
    ViewBag.Title = "PermissionConfig";
    List<WeChatParking.Entity.PermissionQuery> permission = ViewBag.PermissionItems;
    Layout = null;
}
<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
    <h4 class="modal-title">权限配置</h4>
</div>
<div class="modal-body">
    <form class="form-horizontal" id="form-config" method="post" action="/Admin/SavePermissionConfig">
        <input type="hidden" name="RoleID" value="@ViewBag.RoleID" />
        <table border="1" id="tab_type">
            <tr>
                <th id="xth">名称</th>
                <th id="xth">类型</th>
                <th id="xth">是否有权限</th>
            </tr>
            @foreach (var item in permission)
            {  
                <tr id="tr-@item.ID">
                    <td id="xtd">@item.Name</td>
                    <td id="xtd">@item.Type</td>
                    <td id="xtd">
                        <input type="checkbox" id="chb_@item.ID" name="chb_@item.ID" value="true" @Html.Raw(item.isEnable ? " checked " : "") />
                    </td>
                </tr>
            }
        </table>
    </form>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-white" data-dismiss="modal">关闭</button>
    <button type="button" class="btn btn-primary" id="btn-config-save">保存</button>
</div>
